App Engine - Objectify - Storing a byte[]

Posted by Spines on Stack Overflow See other posts from Stack Overflow or by Spines
Published on 2010-04-11T03:04:26Z Indexed on 2010/04/11 3:13 UTC
Read the original article Hit count: 243

I'm using the Objectify library for interfacing with the app engine datastore.

In my User class, I store the hashed password as a byte[]. When I put it in the datastore, it is correctly stored as a blob.

When I try to load the User object back out I get this error:

java.lang.IllegalStateException: Cannot load non-collection value '<Blob: 40 bytes>' into private byte[]

How do I fix this?

Do I have to change my User class to have the hashed password be of type ShortBlob?

© Stack Overflow or respective owner

Related posts about google-app-engine

Related posts about objectify